<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>The Grid: C:/GK/The Grid/TheGrid _doDokumentacji/graphic_engine/mapItem.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">The Grid
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">C:/GK/The Grid/TheGrid _doDokumentacji/graphic_engine/mapItem.h</div>  </div>
</div>
<div class="contents">
<a href="map_item_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#pragma once</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span>
<a name="l00003"></a>00003 <span class="comment">// Typy elementow na mapie</span>
<a name="l00004"></a><a class="code" href="map_item_8h.html#acfedb4dc867f15400ef304c029ceaf9f">00004</a> <span class="keyword">enum</span> <a class="code" href="map_item_8h.html#acfedb4dc867f15400ef304c029ceaf9f">MapItemType</a>
<a name="l00005"></a>00005 {
<a name="l00006"></a><a class="code" href="map_item_8h.html#acfedb4dc867f15400ef304c029ceaf9facb8ae5ca650b378a128e5fa312cc60ee">00006</a>         <a class="code" href="map_item_8h.html#acfedb4dc867f15400ef304c029ceaf9facb8ae5ca650b378a128e5fa312cc60ee">MapItemTypeCreep</a> = 0,
<a name="l00007"></a><a class="code" href="map_item_8h.html#acfedb4dc867f15400ef304c029ceaf9fa5e396b688acecedf5e67a28ef0b0a5f2">00007</a>         <a class="code" href="map_item_8h.html#acfedb4dc867f15400ef304c029ceaf9fa5e396b688acecedf5e67a28ef0b0a5f2">MapItemTypePlayer</a> = 1
<a name="l00008"></a>00008 };
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 <span class="comment">// Wektor 2D</span>
<a name="l00011"></a><a class="code" href="struct_point2_d.html">00011</a> <span class="keyword">struct </span><a class="code" href="struct_point2_d.html">Point2D</a>
<a name="l00012"></a>00012 {
<a name="l00013"></a>00013         <span class="comment">// wspolrzedne wektora</span>
<a name="l00014"></a><a class="code" href="struct_point2_d.html#adbb040f0e224303093e783dfcccd4886">00014</a>         <span class="keywordtype">int</span> <a class="code" href="struct_point2_d.html#a02041472ec3f1ec4d92a926bad5fe2c2">x</a>,<a class="code" href="struct_point2_d.html#adbb040f0e224303093e783dfcccd4886">y</a>;
<a name="l00015"></a>00015         <span class="comment">// konstruktor</span>
<a name="l00016"></a><a class="code" href="struct_point2_d.html#a70efb1ccd0649c6a5820385a722b079a">00016</a>         <a class="code" href="struct_point2_d.html#a2415006d697f1c222c17254bdd302098">Point2D</a>(<span class="keywordtype">int</span> a,<span class="keywordtype">int</span> b)
<a name="l00017"></a>00017         {
<a name="l00018"></a>00018                 <a class="code" href="struct_point2_d.html#a02041472ec3f1ec4d92a926bad5fe2c2">x</a> = a;
<a name="l00019"></a>00019                 <a class="code" href="struct_point2_d.html#adbb040f0e224303093e783dfcccd4886">y</a> = b;
<a name="l00020"></a>00020         }
<a name="l00021"></a>00021 
<a name="l00022"></a>00022         <span class="comment">// standardowy konstruktor</span>
<a name="l00023"></a><a class="code" href="struct_point2_d.html#a2415006d697f1c222c17254bdd302098">00023</a>         <a class="code" href="struct_point2_d.html#a2415006d697f1c222c17254bdd302098">Point2D</a>()
<a name="l00024"></a>00024         {
<a name="l00025"></a>00025                 <a class="code" href="struct_point2_d.html#a02041472ec3f1ec4d92a926bad5fe2c2">x</a> = <a class="code" href="struct_point2_d.html#adbb040f0e224303093e783dfcccd4886">y</a> = 0;
<a name="l00026"></a>00026         }
<a name="l00027"></a>00027 };
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="comment">// klasa obiektu na mapie</span>
<a name="l00030"></a><a class="code" href="classmap_item.html">00030</a> <span class="keyword">class </span><a class="code" href="classmap_item.html">mapItem</a>
<a name="l00031"></a>00031 {
<a name="l00032"></a>00032 <span class="keyword">private</span>:
<a name="l00033"></a>00033         <span class="comment">// pozycja na mapie</span>
<a name="l00034"></a>00034         <a class="code" href="struct_point2_d.html">Point2D</a> mapPos;         
<a name="l00035"></a>00035         <span class="comment">// offset pozycji na mapie</span>
<a name="l00036"></a>00036         <a class="code" href="struct_point2_d.html">Point2D</a> offset; 
<a name="l00037"></a>00037         <span class="comment">// Offset docelowego punktu na mapie</span>
<a name="l00038"></a>00038         <a class="code" href="struct_point2_d.html">Point2D</a> destinationOffset; 
<a name="l00039"></a>00039         <span class="comment">// szybkosc poruszania</span>
<a name="l00040"></a>00040         <span class="keywordtype">int</span> speed;      
<a name="l00041"></a>00041 <span class="keyword">public</span>:
<a name="l00042"></a>00042         <span class="comment">// poziom zycia</span>
<a name="l00043"></a><a class="code" href="classmap_item.html#a5dda4cd2e6f67bd47d1748371c2b3b3f">00043</a>         <span class="keywordtype">int</span> <a class="code" href="classmap_item.html#a5dda4cd2e6f67bd47d1748371c2b3b3f">hp</a>;
<a name="l00044"></a>00044         <span class="comment">// punkt docelowy</span>
<a name="l00045"></a><a class="code" href="classmap_item.html#a12414996d61bfa5fcfecf2ca0b2bf1f1">00045</a>         <a class="code" href="struct_point2_d.html">Point2D</a> <a class="code" href="classmap_item.html#a12414996d61bfa5fcfecf2ca0b2bf1f1">destination</a>;
<a name="l00046"></a>00046         <span class="comment">// kat obrotu wzgledem osi z</span>
<a name="l00047"></a><a class="code" href="classmap_item.html#aca27133a9c7e8f9eda6c164ac8cda51c">00047</a>         <span class="keywordtype">double</span> <a class="code" href="classmap_item.html#aca27133a9c7e8f9eda6c164ac8cda51c">angle</a>;
<a name="l00048"></a>00048         <span class="comment">// typ obiektu</span>
<a name="l00049"></a><a class="code" href="classmap_item.html#a26fad11309aa07c0b47e2a76ac6a0d61">00049</a>         <a class="code" href="map_item_8h.html#acfedb4dc867f15400ef304c029ceaf9f">MapItemType</a> <a class="code" href="classmap_item.html#a26fad11309aa07c0b47e2a76ac6a0d61">type</a>;       
<a name="l00050"></a>00050         <span class="comment">// standardowy konstruktor :)</span>
<a name="l00051"></a>00051         <a class="code" href="classmap_item.html#adf3000fdbf2d0d29579535b58fffa227">mapItem</a>(<a class="code" href="map_item_8h.html#acfedb4dc867f15400ef304c029ceaf9f">MapItemType</a> typ, <span class="keywordtype">int</span> posX,<span class="keywordtype">int</span> posY, <span class="keywordtype">int</span> speed);
<a name="l00052"></a>00052         <span class="comment">// pobieranie pozycji</span>
<a name="l00053"></a>00053         <a class="code" href="struct_point2_d.html">Point2D</a> <a class="code" href="classmap_item.html#ac6b23233dda790f2810b337dca0a8400">getPosition</a>();
<a name="l00054"></a>00054         <span class="comment">// pobieranie offsetu</span>
<a name="l00055"></a>00055         <a class="code" href="struct_point2_d.html">Point2D</a> <a class="code" href="classmap_item.html#a5c0b4d9ba8cfcd973e42f13c78dc469e">getOffset</a>();
<a name="l00056"></a>00056         <span class="comment">// pobieranie wektora kata obrotu</span>
<a name="l00057"></a>00057         <a class="code" href="struct_point2_d.html">Point2D</a> <a class="code" href="classmap_item.html#a589e7650349ab8e5e58515b5fbabff0f">getAngleVec</a>();
<a name="l00058"></a>00058         <span class="comment">// wykonanie &#39;kroku&#39;, tj ruchu jesli jest mozliwy</span>
<a name="l00059"></a>00059         <span class="keywordtype">bool</span> <a class="code" href="classmap_item.html#a96f02388590e46bdbb048d16ab1d7d27">doStep</a>(); 
<a name="l00060"></a>00060         <span class="comment">// oznaczenie punktu jako docelowego i sekwencyjny ruch w kolejnych wywolaniach</span>
<a name="l00061"></a>00061         <span class="keywordtype">void</span> <a class="code" href="classmap_item.html#a00194c1636bae7c56797475f22f6c34d">moveTo</a>(<span class="keywordtype">int</span> posX,<span class="keywordtype">int</span> posY,<span class="keywordtype">int</span> destoX=0,<span class="keywordtype">int</span> destoY=0);
<a name="l00062"></a>00062         <span class="comment">// Przeniesienie do pozycji</span>
<a name="l00063"></a>00063         <span class="keywordtype">void</span> <a class="code" href="classmap_item.html#ace1e086ae514290dd3de1e805ef626ac">teleportTo</a>(<span class="keywordtype">int</span> x,<span class="keywordtype">int</span> y);
<a name="l00064"></a>00064         <span class="comment">// Przeniesienie o podany offset</span>
<a name="l00065"></a>00065         <span class="keywordtype">void</span> <a class="code" href="classmap_item.html#a7f57f8633b7f159e2d27212c179bae25">teleportBy</a>(<span class="keywordtype">int</span> offsetx,<span class="keywordtype">int</span> offsety);
<a name="l00066"></a>00066         <span class="comment">// pobranie szybkosci</span>
<a name="l00067"></a><a class="code" href="classmap_item.html#af237c57bf0c693f37c8665e2c98a65f0">00067</a>         <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classmap_item.html#af237c57bf0c693f37c8665e2c98a65f0">getSpeed</a>(){<span class="keywordflow">return</span> speed;}
<a name="l00068"></a>00068 };
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Fri Sep 30 2011 23:11:30 for The Grid by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
